puts -nonewline {Hello, }
if {$argc == 0} {
    puts -nonewline World
} elseif {$argc == 1} {
    puts -nonewline $argv
} else {
    foreach x [lrange $argv 0 [expr [llength $argv] - 2]] {
        puts -nonewline "$x, "
    }
    puts -nonewline "and [lindex $argv [expr [llength $argv] - 1]]"
}
puts !
